import requests


# # 添加参数的两种方式： 直接写在 url里面，要不写在params里面
# url = "https://www.httpbin.org/get"
# params = {
#     "name": "张三",
#     "id": "12",
# }
# headers = {
#     "User-Agent": "",
#     "Cookie": "",
#     # 防盗链
#     "Referer": "",
# }
# response = requests.get(url, params=params, headers=headers)
# html_str = response.content.decode()
# print(html_str)

# 是否允许重定向 allow_redirects
# 是否验证证书 verify   SSLError

url = "https://www.httpbin.org/post"
requests = requests.post(url)
print(requests.status_code)
print(requests.content.decode())
